//
//  MKCartItemObject.m
//  YangDongXi
//
//  Created by cocoa on 15/4/16.
//  Copyright (c) 2015年 cocoa. All rights reserved.
//

#import "MKCartItemObject.h"

@implementation MKCartItemObject

+ (NSDictionary *)propertyAndKeyMap
{
    return @{@"cartItemUid" : @"cart_item_uid",
             @"skuUid" : @"sku_uid",
             @"stockNum" : @"stock_num",
             @"sellerId":@"seller_id",
             @"itemSkuDesc":@"item_sku_desc",
             @"activityInfo":@"activity_info",
             @"serviceList":@"service_list",
             @"serviceTypeList":@"service_type_list",
             @"accountDiscount":@"activity_info",
             @"itemType":@"item_type",
             @"serviceOther":@"service_list",
             @"higoMark":@"higo_mark",
             @"higoExtraInfo":@"higo_extra_info",
             @"unitPrice" : @"unit_price",
             @"skuSnapshot":@"sku_snapshot"
             };
}

+ (Class)classForArrayItemWithName:(NSString *)propertyName andIndex:(NSInteger)index{
    if ([propertyName isEqualToString:@"accountDiscount"]) {
        return [MKActivityInfoObject class];
    }
    if ([propertyName isEqualToString:@"serviceTypeList"]) {
        return [MKServiceTypeListObject class];
    }
    if ([propertyName isEqualToString:@"higoExtraInfo"]) {
        return [MKHigoExtraInfoObject class];
    }
    if ([propertyName isEqualToString:@"serviceOther"]) {
        return [MKServiceListObject class];
    }
    return nil;
}
@end
